/**
 * @Auto generation code
 * Order Controller J
 */
import request from '../common/request/request.js'

/**
 * 
 * path, params, loading
 * 获取客户的订单列表 - GET
 */
export const getCustomOrderList = async ({// query params
		start ,   // 列表开始  
		limit  = param.default ,   // 列表长度  
		status ,   // 状态  
		mode   // 模式，0表示未支付的列表，1表示进行中的订单列表，2表示已完成的列表，3代表待评价的订单列表，4代表取消的订单，不传表示所有订单  
	
}, loading) => {
	return await request.get('/customer/order', {
		 start,  limit,  status,  mode, 
	}, loading)
}


 console.log('存在put方法，未兼容/customer/order/${orderId}/time，后端需要更正');
/**
 * 
 * path, params, loading
 * 获取悦姐未确认库存订单数 - GET
 */
export const notifyService = async (loading) => {
	return await request.get('/service/order/notify', {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 获取服务可用时间 - GET
 */
export const getServiceAvailable = async ({// query params
		length ,   // 日期长度  
		product ,   // 产品ID  
		address   // 地址ID ,必填 
	
}, loading) => {
	return await request.get('/customer/available', {
		 length,  product,  address, 
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 获取服务可用时间，库存改造版 - POST
 */
export const getServiceAvailableV2 = async (loading) => {
	return await request.post('/customer/available/v2', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * getServiceAvailablePackage - GET
 */
export const getServiceAvailablePackage = async (, {// path params
		packageId   // packageId ,必填 
	
}, {// query params
		length  = param.default ,   // length  
		orderId   // orderId  
	
}, loading) => {
	return await request.get('/customer/available/v2/package/${packageId}', {
		 length,  orderId, 
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 创建一条新的订单 - POST
 */
export const createNewOrder = async (loading) => {
	return await request.post('/customer/order', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 取消订单 - GET
 */
export const cancelOrder = async (, {// path params
		id   // 订单ID ,必填 
	
}, loading) => {
	return await request.get('/customer/order/cancel/${id}', {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 订单评价 - POST
 */
export const customCommentOrder = async (, {// path params
		id   // 订单ID ,必填 
	
}, loading) => {
	return await request.post('/customer/order/comment/${id}', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 订单评价额外信息 - GET
 */
export const customCommentExtraInfo = async (, {// path params
		id   // id ,必填 
	
}, loading) => {
	return await request.get('/customer/order/comment/${id}/commodity', {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 用户获取订单的详情 - GET
 */
export const oneOrderDetail = async (, {// path params
		id   // 订单ID ,必填 
	
}, loading) => {
	return await request.get('/customer/order/${id}', {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 获取服务可用时间 - GET
 */
export const getServiceTime = async (loading) => {
	return await request.get('/customer/service_time', {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 获取服务可用时间 - GET
 */
export const getServiceTimeQuantum = async (loading) => {
	return await request.get('/customer/timeQuantum', {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * getVipDiscount - GET
 */
export const getVipDiscount = async ({// query params
		productId ,   // productId ,必填 
		type   // type ,必填 
	
}, loading) => {
	return await request.get('/customer/vipDiscount', {
		 productId,  type, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * payAfter - GET
 */
export const payAfter = async ({// query params
		productId   // productId ,必填 
	
}, loading) => {
	return await request.get('/payAfter', {
		 productId, 
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * updateCommentStatus - POST
 */
export const updateCommentStatus = async ({// query params
		orderId   // orderId ,必填 
	
}, loading) => {
	return await request.post('/salary/updateCommentStatus', {
		 orderId, 
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * updateOrdertStatus - POST
 */
export const updateOrdertStatus = async ({// query params
		orderId   // orderId ,必填 
	
}, loading) => {
	return await request.post('/salary/updateOrderStatus', {
		 orderId, 
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * payAfter11 - GET
 */
export const payAfter11 = async ({// query params
		orderId ,   // orderId ,必填 
		type   // type  
	
}, loading) => {
	return await request.get('/service/effect', {
		 orderId,  type, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * 获取服务者的订单列表 - GET
 */
export const getServiceOrderList = async ({// query params
		start ,   // 列表开始  
		limit ,   // 列表长度  
		mode ,   // 模式，0表示未完成的订单，1表示已完成的订单，2表示取消的订单，不传表示所有  
		type ,   // 模式，0表示某日订单，1表示某月订单，2表示历史订单，不传表示所有  
		year ,   // 年份  
		month ,   // 月份  
		day   // 日期  
	
}, loading) => {
	return await request.get('/service/order', {
		 start,  limit,  mode,  type,  year,  month,  day, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * 悦姐出发 - GET
 */
export const markServiceOnGoing = async (, {// path params
		id   // 订单ID ,必填 
	
}, loading) => {
	return await request.get('/service/order/departure/${id}', {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 订单清扫效果回传 - POST
 */
export const serviceEffectOrder = async (, {// path params
		id   // 订单ID ,必填 
	
}, loading) => {
	return await request.post('/service/order/effect/${id}', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 悦姐开始服务 - GET
 */
export const markServiceServe = async (, {// path params
		id   // 订单ID ,必填 
	
}, loading) => {
	return await request.get('/service/order/serve/${id}', {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 签单操作 - POST
 */
export const uploadOrderAttachSignatureBase64 = async (, {// path params
		id   // 订单ID ,必填 
	
}, {// query params
		t  = param.default  
	
}, loading) => {
	return await request.post('/service/order/upload/${id}', {
		 t, 
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 服务者获取订单详情 - GET
 */
export const oneServiceOrderDetail = async (, {// path params
		id   // 订单ID ,必填 
	
}, loading) => {
	return await request.get('/service/order/${id}', {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 订单加单 - POST
 */
export const createNewOrderPlus = async (, {// path params
		id   // 订单ID ,必填 
	
}, loading) => {
	return await request.post('/service/order/${id}/plus', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 创建订单库存确认接口 - POST
 */
export const createStockAccept = async (loading) => {
	return await request.post('/stock/create/accept', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 修改订单库存确认接口 - POST
 */
export const updateStockAccept = async (loading) => {
	return await request.post('/stock/update/accept', {
		
	}, {
		
	}, loading)
}

